
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <!-- <script src="vue-2.4.0.js" ></script> -->
    <script src="vue1026.js" ></script>
    <script src="vue-resource-1.3.4.js"></script>
   
</head>

<style>

    #tab{
        width:800px;
        border-collapse: collapse;
        margin: 20px auto;
    }
    #tab th{
        background-color: #0094ff;
        color: white;
        border: solid  black 2px;
        text-align: center;
    }

    #tab td{
        border: solid  black 2px;
        text-align: center;
    }

    .inp{
        width:800px;
        border-collapse: collapse;
        margin: 20px auto;
    }

</style>
<body>
       
        <div id="app">
           
            <button class="in" @click="getData">添加</button>
            <div>
                {{ obj | jsonp}}
            </div>
    </div>22
</body>

<script>
    
    var vm = new Vue({
        el:'#app',
        data:{
            obj:null,
            url:'http://www.baidu.com/?id=1',
        },
        methods:{
            getData:function(){
                this.$http.jsonp(url)
                .then(function(response){
                    this.obj =  response.body;
                },function(response){

                })
            },
        },
       
    });

</script>
</html>